package edu.sctu.zhuyingzhi.month201506.day20150602.foreachTest;

import java.util.*;

/**
 * Created by user13 on 2015/6/2.
 */
public class Test {
    public static void main(String[] args) {
        int[] a = new int[3];
        a[0] = 0;
        a[1] = 1;
        a[2] = 2;
        for (int p : a ){
            System.out.println(p);
        }

        List<String> list = new ArrayList<>();
        list.add("zhu");
        list.add("ying");
        list.add("zhi");

        for (String p : list ){
            System.out.println(p);
        }

        HashMap<Integer,String> map = new HashMap<>();
        map.put(1,"zhu");
        map.put(2,"ying");
        map.put(3,"zhi");


        for (Map.Entry<Integer, String> p : map.entrySet() ){
            System.out.println(p);
        }
    }
}
